/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author XPF
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SportsAverageScore extends BasicModel<SportsAverageScore> {
  singleIndexAdaptGrade?: string; // 单项指标适配年级（单选值）
  indexId?: string; // 单项指标id
  averageValueAdaptSex?: string; // 平均值适配性别
  adaptExecutiveLevel?: number; // 行政级别
  averageScore?: string; // 平均分值
  isDelete?: string; // 删除标记
  averageValueId?: string; // 平均值主键
}

export const sportsAverageScoreList = (params?: SportsAverageScore | any) =>
  defHttp.get<SportsAverageScore>({ url: adminPath + '/sports/sportsAverageScore/list', params });

export const sportsAverageScoreListData = (params?: SportsAverageScore | any) =>
  defHttp.post<Page<SportsAverageScore>>({
    url: adminPath + '/sports/sportsAverageScore/listData',
    params,
  });

export const sportsAverageScoreForm = (params?: SportsAverageScore | any) =>
  defHttp.get<SportsAverageScore>({ url: adminPath + '/sports/sportsAverageScore/form', params });

export const sportsAverageScoreSave = (params?: any, data?: SportsAverageScore | any) =>
  defHttp.postJson<SportsAverageScore>({
    url: adminPath + '/sports/sportsAverageScore/save',
    params,
    data,
  });

export const sportsAverageScoreDelete = (params?: SportsAverageScore | any) =>
  defHttp.get<SportsAverageScore>({ url: adminPath + '/sports/sportsAverageScore/delete', params });
